home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 3
/
Cream of the Crop 3.iso
/
clipper
/
ks94an.zip
/
FILEBROW.HDR
< prev
next >
Wrap
Text File
|
1994-04-25
|
2KB
|
66 lines
/******************************************************************************
The Klipper Library, for CA-Clipper 5.x
Copyright (c), 1994, Wallace Information Systems Engineering
FUNCTION:
_FileBrowse( nFRow, nFCol, nTRow, nTCol, nHandle, nTabSpaces ) --> lFilePtr
PARAMETERS:
nFRow : Window Coordinates
nFCol : ""
nTRow : ""
nTCol : ""
nHandle : file handle of previously opened file
nTabSpaces: Number of spaces to convert tabs to (DEFAULT: 4)
SHORT:
Browse a text file - will accomodate many megabytes in size.
DESCRIPTION:
_FileBrowse() is a, well, file browser. The file to be browsed must have
been previously opened. Data on any line that falls beyond the right
margin defined by the window coordinates is truncated (from view).
If nTabSpaces = 0, then no spaces are inserted in place of tabs and the tab
character (chr(9)) is displayed.
NOTE:
In consideration of speed, nTabSpaces is NOT type checked any farther
than NIL. If it is NIL, no tab replacement occurs. If it is !NIL, then
a numeric is expected and anything else will cause a run-time error.
Note that _FileBrowse() will change the current position of the file pointer
returning it's last position as the functions return value.
Use PgUp and PgDn to view, and ESC to quit.
The file size is limited, theoretically, to approximately 8 MB in 25x80 mode.
In 43x80, appx. 14 MB, and in 50x132, appx. 27 MB.
EXAMPLE:
FUNCTION main()
LOCAL nHandle
// assuming TEST.TXT is in the current directory
nHandle = fopen("test.txt",FO_READ)
if ferror() = 0
_FScreen('File Browse Test')
_PopBox(3,0,MaxRow(),MaxCol())
_FileBrowse(4,1,MaxRow()-1,MaxCol()-1,nHandle)
fclose(nHandle)
endif
RETURN(NIL)
******************************************************************************/